<template>
  <HeaderViews v-if="showPrint"></HeaderViews>
  <NavViews v-if="showPrint"></NavViews>
  <router-view></router-view>
  <FooterViews v-if="showPrint"></FooterViews>
</template>
<script setup lang="ts">
 
const showPrint=ref<boolean>(true)
onMounted(() => {

  const router = useRouter();
  const route = useRoute();  
  // if(route.fullPath=='/adminPrint'){
  //   showPrint.value=true
  // }else{
  //   showPrint.value=false
  // }
   route.fullPath=='/adminPrint'?showPrint.value=false:showPrint.value=true
   window.addEventListener('beforeunload', () => {
    sessionStorage.setItem('currentRoute', route.fullPath);
  });

  window.addEventListener('load', () => {
    const currentRoute = sessionStorage.getItem('currentRoute');
    if (currentRoute) {
      router.push(currentRoute)
    }
  });
})

</script>
<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  color: #2c3e50;
}

nav {
  padding: 30px;
}

nav a {
  font-weight: bold;
  color: #2c3e50;
}

nav a.router-link-exact-active {
  color: #42b983;
}
</style>
